package edu.umassd.visual.options;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.AbstractButton;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import edu.umassd.visual.components.Zoom;

/**
 * Enables the zoom component.
 * 
 * @author Dan Avila
 */
@Component
public class ToggleZoom implements ActionListener
{
	@Autowired
	private Zoom zoom;

	@Override
	public void actionPerformed(ActionEvent e)
	{
		AbstractButton button = (AbstractButton) e.getSource();

		zoom.setVisible(button.isSelected());
	}

}
